#include <iostream>
#include <list>
using namespace std;

bool op (int &a, int &b) {
    return a > b;
}
int main()
{
    list<int> l1;
    list<int> l2;

    for (int i = 1; i <= 60; i+=2) {
        l1.push_back(i);
    }
    for (int i = 2; i <= 100; i+=2) {
        l2.push_back(i);
    }


    list<int> l3;
    auto l1b = l1.begin();
    auto l2b = l2.begin();
    bool i = true;
    for (; l1b != l1.end() || l2b != l2.end();) {
        if(i) {
            if (l1b == l1.end()) {
                i = false;
                continue;
            }
            l3.push_back(*l1b);
            l1b++;
            i = !i;
        } else {
            if (l2b == l2.end()) {
                i = true;
                continue;
            }
            l3.push_back(*l2b);
            l2b++;
            i = !i;
        }
    }
    // l1.merge(l2, op);

    int index = 1;
    for(auto it = l3.begin(); it != l3.end(); it++,index++) {
        cout << *it << "-->";
        if (index % 10 == 0) cout << endl;
    }

    return 0;
}